package com.weixing.mall.provider.api.service;

import com.weixing.mall.base.wrapper.Result;
import com.weixing.mall.provider.api.fallback.AuthServieFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.ribbon.FeignRibbonClientAutoConfiguration;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * @Author: kfc
 * @Description: <br/>
 * Date:Create in 2019/8/2 17:36
 * @Modified By:
 */
@FeignClient(value = "mall-provider-uaa", configuration = FeignRibbonClientAutoConfiguration.class, fallback = AuthServieFallback.class)
public interface AuthServiceRpc {

    @GetMapping(value = "/auth/permission")
    Result auth(@RequestParam(value = "token", required = false) String token);


    @GetMapping("/token/check")
    Result<Map<String, Object>> checkToken(@RequestParam(value = "accessToken", required = false) String accessToken);
}
